package syntax;

public class A {

  public String name = "A";

  public String getName() {
    return name;
  }

  public void setName(String name){
    this.name = name;
  }

  public static class B extends A {

    public String name = "B";

    public String getName() {
      return name;
    }

    public void setName(String name){
      this.name = name;
    }

  }

  public static void main(String[] args) {
    A a = new B();
    System.out.println(a.name);
  }

}
